<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
	<script>
		function getListData(page, pageSize, list) {
			return list.slice((page - 1) * pageSize, page * pageSize);
		}
		// 处理数据-进行分页处理
		function setPageData(e) {
			let list = getListData(1, 10, e);
			console.log(list)
		}

		function getData() {
			// 造假数据
			let list = [];
			for (let i = 0; i < 35; i++) {
				list.push({
					userName: "姓名" + (i + 1),
					deptName: "所属部门",
					loc: "当前所属具体位置",
					time: "2022-8-15 23:12:14",
				});
			}
			setPageData(JSON.parse(JSON.stringify(list)));
		}
		getData()
	</script>
</html>
